from django.urls import path
from .views import (
    CourseListView, CourseDetailView, TeacherListView,
    CourseSemesterListView, CourseStatisticsView, CourseStatusUpdateView
)

app_name = 'courses'

urlpatterns = [
    # 课程CRUD
    path('courses/', CourseListView.as_view(), name='course_list'),
    path('courses/<int:course_id>/', CourseDetailView.as_view(), name='course_detail'),
    path('courses/<int:course_id>/status/', CourseStatusUpdateView.as_view(), name='course_status_update'),

    # 辅助接口
    path('teachers/', TeacherListView.as_view(), name='teacher_list'),
    path('semesters/', CourseSemesterListView.as_view(), name='semester_list'),
    path('courses/statistics/', CourseStatisticsView.as_view(), name='course_statistics'),
]